﻿using Pay.TO;
using System;
using System.Collections.Generic;

namespace Pay.DTO {
    /// <summary>
    /// 基本商户信息
    /// </summary>
    [Serializable]
    public class merchant_base_info {
        public merchant_base_info() {
            setting = new merchant_setting();
        }
        /// <summary>
        /// 商户id
        /// </summary>
        public virtual long id { get; set; }
        /// <summary>
        /// 用户唯一id，由调用接口传入的用户唯一编号，增加和修改都必须传
        /// </summary>
        public virtual string openid { get; set; }
        /// <summary>
        /// 推荐人ID
        /// </summary>
        public long parent_id { get; set; }
        /// <summary>
        /// 电话
        /// </summary>
        public virtual string mobile { get; set; }
        /// <summary>
        /// 商户号
        /// </summary>
        public virtual string merchant_no { get; set; }
        /// <summary>
        /// 姓名
        /// </summary>
        public virtual string name { get; set; }
        /// <summary>
        /// 头像
        /// </summary>
        public virtual string photo { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public virtual string remark { get; set; }
        /// <summary>
        /// 审核
        /// </summary>
        public virtual AuthStatusEnum auth_status { get; set; }
        /// <summary>
        /// 共钥
        /// </summary>
        public string public_key { get; set; }
        /// <summary>
        /// oemid
        /// </summary>
        public long? oem_id { get; set; }

        /// <summary>
        /// json：个人设置
        /// </summary>
        public virtual merchant_setting setting { get; set; }
        /// <summary>
        /// 是否收款代付
        /// </summary>
        public bool trade_outpay { get; set; }
        /// <summary>
        /// 是否供应商
        /// </summary>
        public bool is_supplier { get; set; }
        /// <summary>
        /// 是否o单商户
        /// </summary>
        public bool is_oem { get; set; }
        /// <summary>
        /// 是否平台
        /// </summary>
        public bool is_platform { get; set; }
        /// <summary>
        /// 用户类型 用户角色:1：管理员，2：oem。3：普通用户
        /// </summary>
        public UserType? usertype { get; set; }
        /// <summary>
        /// 供应商域名
        /// </summary>
        public string domain { get; set; }
        /// <summary>
        /// 创建日期
        /// </summary>
        public DateTime create_time { get; set; }
        /// <summary>
        /// 是否禁用
        /// </summary>
        public bool disabled { get; set; }
        /// <summary>
        /// 是否实人认证通过
        /// </summary>
        public bool is_face { get; set; }
        /// <summary>
        /// 认证时间
        /// </summary>
        public DateTime face_time { get; set; }
        /// <summary>
        /// 最后登录日期
        /// </summary>
        public DateTime login_time { get; set; }
    }

    /// <summary>
    /// 商户表:后台使用
    /// </summary>
    [Serializable]
    public class merchant_info : merchant_base_info {
        public merchant_info() {
            payments = new List<merchant_payment_dto>();
            registers = new List<merchant_register_dto>();
        }
        /// <summary>
        /// 上级商户号
        /// </summary>
        public string parent_no { get; set; }
        /// <summary>
        /// 角色id
        /// </summary>
        public long? roleid { get; set; }
        /// <summary>
        /// 商户支付方式
        /// </summary>
        public List<merchant_payment_dto> payments { get; set; }
        /// <summary>
        /// 进件的通道
        /// </summary>
        public List<merchant_register_dto> registers { get; set; }
    }
    /// <summary>
    /// 商户(前台用)
    /// </summary>
    [Serializable]
    public class merchant_dto : merchant_base_info {
        /// <summary>
        /// 区号
        /// </summary>
        public string mobile_code { get; set; }
        /// <summary>
        /// 等级id
        /// </summary>
        public long? grade_id { get; set; }
        /// <summary>
        /// 升级时间
        /// </summary>
        public DateTime? upgrade_time { get; set; }
    }

    /// <summary>
    /// 个人设置
    /// </summary>
    [Serializable]
    public class merchant_setting {
        public merchant_setting() {
            auth_info = new auth_info_setting();
            hf_set = new hf_set();
            shop_info = new shop_info();
            wx_app = new wx_app();
            oss_set = new oss_setting();
        }
        /// <summary>
        /// HF设置
        /// </summary>
        public hf_set hf_set { get; set; }
        /// <summary>
        /// 汇享天成设置
        /// </summary>
        public string hx_merchant_no { get; set; }
        /// <summary>
        /// 睿付
        /// </summary>
        public string rpay_merchant_no { get; set; }
        /// <summary>
        /// 睿付代还
        /// </summary>
        public string rpayout_merchant_no { get; set; }
        /// <summary>
        /// 身份证和银行卡-实名
        /// </summary>
        public auth_info_setting auth_info { get; set; }
        /// <summary>
        /// 店铺信息
        /// </summary>
        public shop_info shop_info { get; set; }
        /// <summary>
        /// HF设置
        /// </summary>
        public wx_app wx_app { get; set; }
        /// <summary>
        /// oss设置
        /// </summary>
        public oss_setting oss_set { get; set; }
    }
    /// <summary>
    /// HF设置
    /// </summary>
    [Serializable]
    public class hf_set {
        /// <summary>
        /// 商户T0进件商户号
        /// </summary>
        public string t0_native_mchid { get; set; }
        /// <summary>
        /// 商户T1进件商户号
        /// </summary>
        public string t1_native_mchid { get; set; }
        /// <summary>
        /// 快捷商户号
        /// </summary>
        public string quick_mchid { get; set; }
        /// <summary>
        /// 微信经营类目
        /// </summary>
        public string category_wx { get; set; }
        /// <summary>
        /// 支付宝经营类目
        /// </summary>
        public string category_zfb { get; set; }
        /// <summary>
        /// 京东经营类目
        /// </summary>
        public string category_jd { get; set; }
        /// <summary>
        /// 微信号
        /// </summary>
        public string wx_account { get; set; }
        /// <summary>
        /// 开通微信扫码支付状态
        /// </summary>
        public AuthStatusEnum open_wx { get; set; }
        /// <summary>
        /// 通知URL
        /// </summary>
        public string notify { get; set; }
    }

    /// <summary>
    /// 微信app支付设置
    /// </summary>
    [Serializable]
    public class wx_app {
        public string app_id { get; set; }
        public string app_secret { get; set; }
        public string mchid { get; set; }
    }

    /// <summary>
    /// oss设置
    /// </summary>
    [Serializable]
    public class oss_setting {
        /// <summary>
        /// 公共key
        /// </summary>
        public string key { get; set; }
        /// <summary>
        /// 公共钥匙
        /// </summary>
        public string secret { get; set; }
        /// <summary>
        /// app授权key
        /// </summary>
        public string app_key { get; set; }
        /// <summary>
        /// app授权钥匙
        /// </summary>
        public string app_secret { get; set; }
        /// <summary>
        /// 区域
        /// </summary>
        public string endpoint { get; set; }
        /// <summary>
        /// app授权钥匙
        /// </summary>
        public string arn { get; set; }
        /// <summary>
        /// oss库名，正式与测试不一样
        /// </summary>
        public string bucket_name { get; set; }
        /// <summary>
        /// OSS域名
        /// </summary>
        public string img_url { get; set; }
    }

    /// <summary>
    /// 店铺信息
    /// </summary>
    [Serializable]
    public class shop_info {
        /// <summary>
        /// 店铺名称
        /// </summary>
        public string shop_name { get; set; }
        /// <summary>
        /// 县区id
        /// </summary>
        public long region_id { get; set; }
        /// <summary>
        /// 具体街道信息
        /// </summary>
        public string address { get; set; }
        /// <summary>
        /// 营业执照
        /// </summary>
        public string business_license { get; set; }
    }

    /// <summary>
    /// 身份证和银行卡
    /// </summary>
    [Serializable]
    public class auth_info_setting {
        /// <summary>
        /// 卡类型：0个人，1企业
        /// </summary>
        public int busi_type { get; set; }
        /// <summary>
        /// 户名
        /// </summary>
        public string account_name { get; set; }
        /// <summary>
        /// 银行编号
        /// </summary>
        public string bank_code { get; set; }
        /// <summary>
        /// 银行名称
        /// </summary>
        public string bank_name { get; set; }
        /// <summary>
        /// 支行编号
        /// </summary>
        public string branch_code { get; set; }
        /// <summary>
        /// 支行名称
        /// </summary>
        public string branch_name { get; set; }
        /// <summary>
        /// 账号
        /// </summary>
        public string account_no { get; set; }
        /// <summary>
        /// 身份证
        /// </summary>
        public string id_card { get; set; }
        /// <summary>
        /// 预留手机号码
        /// </summary>
        public string mobile { get; set; }
        /// <summary>
        /// 省
        /// </summary>
        public string province { get; set; }
        /// <summary>
        /// 市
        /// </summary>
        public string city { get; set; }
        /// <summary>
        /// 区
        /// </summary>
        public string area { get; set; }
        /// <summary>
        /// 县区id
        /// </summary>
        public long region_id { get; set; }
        /// <summary>
        /// 身份证＋银行卡正面照
        /// </summary>
        public string card_positive { get; set; }
        /// <summary>
        /// 身份证反面照
        /// </summary>
        public string card_negative { get; set; }
        /// <summary>
        /// 手持身份证+银行卡
        /// </summary>
        public string card_handheld { get; set; }
        /// <summary>
        /// 银行卡反面
        /// </summary>
        public string bank_negative { get; set; }
        /// <summary>
        /// 银行卡正面
        /// </summary>
        public string bank_positive { get; set; }
        /// <summary>
        /// 身份证有效期开始时间
        /// </summary>
        public string start_time { get; set; }
        /// <summary>
        /// 身份证有效期结束时间
        /// </summary>
        public string end_time { get; set; }
        /// <summary>
        /// 通知URL
        /// </summary>
        public string notify { get; set; }
    }
}